package com.lhhu.demo.service.impl;

import com.lhhu.demo.bean.UserInfo;
import com.lhhu.demo.mapper.UserMapper;
import com.lhhu.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther 虎
 * @Data 2021/3/14 18:41
 * @Version 1.0
 */
@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserMapper userMapper;

    @Override
    public int addOneUser(UserInfo userInfo) {
        return userMapper.addOneUser(userInfo);
    }

    @Override
    public List<UserInfo> selectUserByOpenid(String openid) {
        return userMapper.selectUserByOpenid(openid);
    }

    @Override
    public List<UserInfo> getAllUser() {
        return userMapper.getAllUser();
    }

    @Override
    public List<UserInfo> getUserByName(String nickName) {
        return userMapper.getUserByName(nickName);
    }

    @Override
    public List<UserInfo> getUserByGender(String gender) {
        return userMapper.getUserByGender(gender);
    }

    @Override
    public List<UserInfo> getUserByTag(String tag) {
        return userMapper.getUserByTag(tag);
    }

    @Override
    public int updateUserMessage(String codes,UserInfo userInfo) {
        return userMapper.updateUserMessage(userInfo);
    }

    @Override
    public int deleteOneUser(String codes,String openid) {
        return userMapper.deleteOneUser(openid);
    }
}
